import { S } from '../../s';
import { IPSDEFormTabPage } from './ipsdeform-tab-page';
import { IPSDEFormTabPanel } from './ipsdeform-tab-panel';
import { PSDEFormDetailImpl } from './psdeform-detail-impl';

export class PSDEFormTabPanelImpl
  extends PSDEFormDetailImpl
  implements IPSDEFormTabPanel
{
  protected psdeformtabpages: IPSDEFormTabPage[];
  getPSDEFormTabPages(): IPSDEFormTabPage[] | null {
    return (
      this.psdeformtabpages ||
      (this.psdeformtabpages = this.fillChildListModel(
        this.M.getPSDEFormTabPages,
        S._bf,
      ) as IPSDEFormTabPage[])
    );
  }

  findPSDEFormTabPage(objKey: any): IPSDEFormTabPage | null {
    return this.getPSModel5(
      S._bf,
      this.getPSDEFormTabPages(),
      objKey,
    ) as IPSDEFormTabPage;
  }

  get showCaption(): boolean {
    return this.M.showCaption;
  }
  get cls(): string {
    return 'PSDEFormTabPanelImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._c0) return true;
    return super.instanceof(cls);
  }
}
